<template>
	<view>
		<view class="cons">
			<view v-for="(val,ind) in list" :key="ind" :class="ind==index?'conn':'con'" @click="tog(ind)">
				{{val.txt}}
			</view>
		</view>
	</view>
</template>

<script>
export default{
	props:{
		list:Array,
		index:Number
	},
	data(){
		return{
		}
	},
	methods:{
		tog(ind){
			this.$emit("parsebtn",ind)
		}
	}
}
</script>

<style>
	.cons{
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: center;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		background-color:  #3b3b43;
		color: #ffb23f;
		/* margin-top: 30rpx; */
	}
	.cons .con{
		width: 25%;
		height: 80rpx;
		border-bottom: solid 2px #3b3b43;
		margin: 10rpx 10px;
		margin-bottom: 20rpx;
	}
	.cons .conn{
		width: 25%;
		height: 80rpx;
		border-bottom: solid 2px #ffb23f;
		margin: 10rpx 10px;
		margin-bottom: 20rpx;
	}
</style>
